<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <meta name="csrf-param" content="_token">
	<title>君乐在线投票系统</title>
	@section('css')
		<link href="{{ asset('web/css/style.css') }}" rel="stylesheet" type="text/css" />
	@show
	<!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
	<![endif]-->
		<script src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default">
	<div class="container">
		<div class="collapse navbar-collapse" id="bs-nav-bar">
			<ul class="nav navbar-nav">
				<li><a href="{{ url('/') }}">首页</a></li>
				<li><a href="{{ url('home') }}">我的竞选</a></li>
				@if(Auth::check() && Auth::user()->is_admin)
					<li><a href="{{ url('admin') }}">管理</a></li>
				@endif
			</ul>
			<ul class="nav navbar-nav navbar-right">
				@if (Auth::guest())
					<li><a href="{{ url('/auth/login') }}">登录</a></li>
					<li><a href="{{ url('/auth/register') }}">注册</a></li>
				@else
					<li>{{ Auth::user()->name }}</li>
					<li>
						<a href="{{ url('/auth/logout') }}">退出</a>
					</li>
				@endif
			</ul>
		</div>
	</div>
</nav>
	@yield('content')
	<script src="{{ asset('/js/app.js') }}"></script>
</body>
</html>
